// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import vueRouter from 'vue-router'
import vueResource from 'vue-resource'

Vue.use(vueResource)
Vue.use(vueRouter)

Vue.config.productionTip = false

import index from './components/index.vue'
import basicInfo from './components/basicInfo.vue'
import schoolInfo from './components/schoolInfo.vue'
import teachingTime from './components/teachingTime.vue'
import teachingExperience from './components/teachingExperience.vue'
import teacherSubject from './components/teacherSubject.vue'
import teacherPicture from './components/teacherPicture.vue'

const routes = [
    { path: '/', redirect: '/index'}, 
    { path: '/index', name:'index', component: index, meta: {keepAlive: true} },
    { path: '/basicInfo', name:'basicInfo', component: basicInfo, meta: {keepAlive: false}  },
    { path: '/schoolInfo', name:'schoolInfo', component: schoolInfo, meta: {keepAlive: false}  },
    { path: '/teachingTime', name:'teachingTime', component: teachingTime, meta: {keepAlive: false}  },
    { path: '/teachingExperience', name:'teachingExperience', component: teachingExperience, meta: {keepAlive: false}  },
    { path: '/teacherSubject', name:'teacherSubject', component: teacherSubject, meta: {keepAlive: false}  },
    { path: '/teacherPicture', name:'teacherPicture', component: teacherPicture, meta: {keepAlive: false}  }
]

const router = new vueRouter({
  routes
})

new Vue({
  el: '#app',
  template: '<App/>',
  components: { App },
  router
});